package com.zqh.myfmmall.config;

import com.zqh.myfmmall.clients.ProductCommentQueryClient;
import com.zqh.myfmmall.fallback.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-03-15 21:52
 */
@Configuration
public class FeignConfig{


    //注册feign客户端降级逻辑为bean
    @Bean
    public CategoryQueryClientFallback categoryQueryClientFallback(){
        return new CategoryQueryClientFallback();
    }

    @Bean
    public IndexQueryClientFallback indexQueryClientFallback(){
        return new IndexQueryClientFallback();
    }

    @Bean
    public OrderQueryClientFallback orderQueryClientFallback(){
        return new OrderQueryClientFallback();
    }

    @Bean
    public OrderUdClientFallback orderUdClientFallback(){
        return new OrderUdClientFallback();
    }

    @Bean
    public ProductQueryClientFallback productQueryClientFallback(){
        return new ProductQueryClientFallback();
    }

    @Bean
    public ProductCommentCUDClientFallback productCommentCUDClientFallback(){
        return new ProductCommentCUDClientFallback();
    }

    @Bean
    public ProductCommentQueryClientFallback productCommentQueryClientFallback(){
        return new ProductCommentQueryClientFallback();
    }

    @Bean
    public ShoppingCartCUDClientFallback shoppingCartCUDClientFallback(){
        return new ShoppingCartCUDClientFallback();
    }

    @Bean
    public ShoppingCartQueryClientFallback shoppingCartQueryClientFallback(){
        return new ShoppingCartQueryClientFallback();
    }

    @Bean
    public UserAddrCUDClientFallback userAddrCUDClientFallback(){
        return new UserAddrCUDClientFallback();
    }

    @Bean
    public UserAddrQueryClientFallback userAddrQueryClientFallback(){
        return new UserAddrQueryClientFallback();
    }

    @Bean
    public ElasticSearchClientFallback elasticSearchClientFallback(){
        return new ElasticSearchClientFallback();
    }

    @Bean
    public OrderItemSaveClientFallback orderItemSaveClientFallback(){
        return new OrderItemSaveClientFallback();
    }

    @Bean
    public OrderCheckExpiredClientFallback orderCheckExpiredClientFallback(){
        return new OrderCheckExpiredClientFallback();
    }

    @Bean
    public OrderSaveClientFallback orderSaveClientFallback(){
        return new OrderSaveClientFallback();
    }

    @Bean
    public OrderItemQueryClientFallback orderItemQueryClientFallback(){
        return new OrderItemQueryClientFallback();
    }

    @Bean
    public ProductSkuQueryClientFallback productSkuQueryClientFallback(){
        return new ProductSkuQueryClientFallback();
    }

    @Bean
    public ProductSkuCUDClientFallback productSkuCUDClientFallback(){
        return new ProductSkuCUDClientFallback();
    }

    @Bean
    public ProductImgQueryClientFallback productImgQueryClientFallback(){
        return new ProductImgQueryClientFallback();
    }

    @Bean
    public UserQueryClientFallback userQueryClientFallback(){
        return new UserQueryClientFallback();
    }

    @Bean
    public UserSaveClientFallback userSaveClientFallback(){
        return new UserSaveClientFallback();
    }

    @Bean
    public WechatPayClientFallback wechatPayClientFallback(){
        return new WechatPayClientFallback();
    }

    @Bean
    public MqMessageClientFallback mqMessageClientFallback(){
        return new MqMessageClientFallback();
    }
}
